Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update after selection in Color Picker #766

Merged
merged 2 commits into from
Jun 13, 2024

Conversation

hernanmd
Copy link
Collaborator

Update each settings browser button color when a color is accepter in the Color Picker window.

Remove unnecessary initializePresenters in StSettingSectionPresenter.

… the Color Picker window.

Remove unnecessary initializePresenters in StSettingSectionPresenter.
@hernanmd hernanmd self-assigned this May 31, 2024
@hernanmd hernanmd added the bug Something isn't working label May 31, 2024
@hernanmd
Copy link
Collaborator Author

Fixes #767

@hernanmd hernanmd requested review from demarey and jecisc June 4, 2024 13:53
@Ducasse Ducasse merged commit 61dba20 into pharo-spec:Pharo13 Jun 13, 2024
1 of 2 checks passed
Copy link
Member

@estebanlm estebanlm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please review those small issues (specially the first one).
notice that it is possible that you do not want a builder, in that case, please ensure in the other side (the one that will use the result of asSettingPresenter), there is an owner set to the resulting presenter.

settingsTarget := aSettingDeclaration realTarget perform: aSettingDeclaration targetSelector.
settingsTarget perform: aSettingDeclaration getSelector ].

settingPresenter := (SpPresenter new instantiate: StSettingSHStyleButtonColorPresenterItem on: aSettingDeclaration).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is equivallent to just StSettingSHStyleButtonColorPresenterItem on: aSettingDeclaration, no need of the bureaucracy... and in any case is not recommended to do it like that. Which is the application that presenter belongs to?
(this still can work if you will after add that presenter to another that knows its app, or set the app, but as is, it doesn't)
The recommended way of doing this is by passing a builder (see SpPresenterBuilder)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I'll address the suggested changes in a new issue


colorPickerPresenter := aPresenter instantiate: SpColorPickerWindow on: self.
colorPickerPresenter
whenChangedDo: [ : c |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer real names "aColor" or something like that.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above, I will address the changes in a new issue.

@estebanlm
Copy link
Member

and now you need to give me a new PR fixing that, as @Ducasse merged :P

@hernanmd hernanmd deleted the fix_st_browser_color_update branch June 20, 2024 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants